package com.xayy.health.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 卫星画像-配置节点-关系
 * @author zhangxa
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "HEALTH.tb_satellite_relation")
@EqualsAndHashCode(callSuper = true)
public class SatelliteRelation extends BaseModel<Long> {

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "node_id")
    private Long nodeId;

    @Column(name = "relation_type")
    @ApiModelProperty(value = "关联类型")
    private Integer relationType;

    @Transient
    private String relationTypeName;

    @Column(name = "backup_type")
    @ApiModelProperty(value = "备份类型")
    private Integer backupType;

    @Transient
    private String backupTypeName;

    @Column(name = "input_node")
    @ApiModelProperty(value = "输入节点")
    private String inputNode;

    @Column(name = "output_node")
    @ApiModelProperty(value = "输出节点")
    private String outputNode;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Override
    public Long idValue() {
        return id;
    }
}
